/** @file cam-reg-config.h 
 * Enthält die Konfiguration der Kamera-Register.
 * ACHTUNG: Die Registernummern werden lcv-config.h definiert
 * 
 * @author Daniel Kummer, Sebastian Kummer
 * @date Donnerstag, Dezember 12, 2007
 * @version 1.0
 */

#ifndef LCVREGCONFIG_H_
#define LCVREGCONFIG_H_

#include "lcv-structs.h"

/**
 * Die Registerkonfigurationen
 * Die Werte wurden aus dem Datenblatt des CMOS Sensors mt9v032.pdf entnommen.
 */
const lcv_reg_config cam_reg_config[] = {
										{0x00, 0, 0xFFFF, 0x1313}, /*  0 */ /**< Read-Only */
										{0x01, 1, 0x03FF, 0x0001}, /*  1 */
										{0x02, 4, 0x01FF, 0x0004}, /*  2 */
										{0x03, 0, 0x01e0, 0x01e0}, /*  3 */
										{0x04, 0, 0x02f0, 0x02f0}, /*  4 */
										{0x05, 0, 0x03FF, 0x005e}, /*  5 */
										{0x06, 0, 0x7FFF, 0x002d}, /*  6 */
										{0x07, 0, 0x0FFF, 0x0398}, /*  7 */
										{0x08, 0, 0x7FFF, 0x01bb}, /*  8 */
										{0x09, 0, 0x7FFF, 0x01d9}, /*  9 */
										{0x0a, 0, 0x03FF, 0x0164}, /* 10 */
										{0x0b, 0, 0x7FFF, 0x01e0}, /* 11 */ 
										{0x0c, 0, 0x0003, 0x0000}, /* 12 */
										{0x0d, 0x0300, 0x03FF, 0x0320},  /*  13 */
										{0x0e, 0, 0x0001, 0x0000}, /* 14 */
										{0x0f, 0, 0x00FF, 0x0011}, /* 15 */
										{0x1b, 0, 0x0003, 0x0000}, /* 16 */
										{0x1c, 0, 0x0003, 0x0002}, /* 17 */
										{0x2c, 0, 0x0007, 0x0004}, /* 18 *//* Unmöglicher Defaultwert in Datenblatt */
										{0x31, 0, 0x001F, 0x001d}, /* 19 */
										{0x32, 0, 0x001F, 0x0018}, /* 20 */
										{0x33, 0, 0x001F, 0x0015}, /* 21 */
										{0x34, 0, 0x001F, 0x0004}, /* 22 */
										{0x35, 0, 0x007F, 0x0010}, /* 23 */
										{0x36, 0, 0x007F, 0x0040}, /* 24 */
										{0x42, 0, 0x00FF, 0x0018}, /* 25 */ /**< Read-Only */
										{0x46, 0, 0xFFFF, 0x231d}, /* 26 */
										{0x47, 0, 0x80E1, 0x8080}, /* 27 */ /**< Nur gewisse Werte erlaubt, Datenblatt betrachten */
										{0x48, 0, 0x00FF, 0x0016}, /* 28 */ 
										{0x4c, 0, 0x001F, 0x0002}, /* 29 */
										{0x70, 0, 0x083F, 0x0034}, /* 30 */ /**< Nur gewisse Werte erlaubt, Datenblatt betrachten */
										{0x72, 0, 0x00FF, 0x002a}, /* 31 */
										{0x73, 0, 0x03FF, 0x2f7}, /* 32 */
										{0x74, 0, 0x001F, 0x0000}, /*  33 */ /* Pixclk, FV, LV   */
										{0x7f, 0, 0x7FFF, 0x0000}, /* 34 */
										{0xa5, 0, 0x003F, 0x003a}, /* 35 */
										{0xa6, 0, 0x000F, 0x0002}, /* 36 */
										{0xa8, 0, 0x0003, 0x0000}, /* 37 */
										{0xa9, 0, 0x000F, 0x0002}, /* 38 */
										{0xab, 0, 0x0003, 0x0002}, /* 39 */
										{0xaf, 0, 0x0003, 0x0003}, /* 40 */
										{0xb0, 0, 0xFFFF, 0xabe0}, /* 41 */
										{0xb4, 0, 0x0003, 0x0000}, /* 42 */
										{0xba, 0, 0x007F, 0x0010}, /* 43 */ /** Read-Only */
										{0xbb, 0, 0xFFFF, 0x01e0}, /* 44 */ /** Read-Only */
										{0xbc, 0, 0x003F, 0x0015}, /* 45 */ /** Read-Only */
										{0xbd, 0, 0xFFFF, 0x01e0}, /* 46 */
										{0xbe, 0, 0x00FF, 0x0014}, /* 47 */
										{0xbf, 0, 0x01FF, 0x0016}, /* 48 */
										{0xc0, 0, 0x00FF, 0x000a}, /* 49 */
										{0xc1, 0, 0x03FF, 0x0158}, /* 50 */ /** Read-Only */
										{0xc2, 0, 0xFFFF, 0x0840}, /* 51 */
										{0xc3, 0, 0x0003, 0x0000}, /* 52 */ /* Unmöglicher Defaultwert in Datenblatt */
										{0xc4, 0, 0xFFFF, 0x4416}, /* 53 */
										{0xc5, 0, 0xFFFF, 0x4421}, /* 54 */
										{0xf0, 0, 0xFFFF, 0x2100}, /* 55 */ /** Read-Only */
										{0xfe, 0, 0xFFFF, 0xbeef} /*  56 */
										};

/**
 * Anzahl Kameraregister
 */
unsigned int cam_registers_cnt = sizeof(cam_reg_config) / sizeof(*cam_reg_config);

#endif /*LCVREGCONFIG_H_*/
